parameter 'i' implicitly has an 'any' type. TS(7006)